import { Application } from "../App";
import { vtkAbstractWidgetFactory } from "@kitware/vtk.js/Widgets/Core/AbstractWidgetFactory";
import vtkWidgetManager from "@kitware/vtk.js/Widgets/Core/WidgetManager";
export class WidgetSystem {
  parent: Application;
  widgetManager: vtkWidgetManager = vtkWidgetManager.newInstance();

  constructor(parent: Application) {
    this.parent = parent;
  }

  add(widget: vtkAbstractWidgetFactory<any>) {
    const vm = this.widgetManager.addWidget(widget);
    return vm;
  }

  remove(widget: vtkAbstractWidgetFactory<any>) {
    this.widgetManager.removeWidget(widget);
  }
}
